// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   UploadFile.java

package com.hfstu.file.model;

import com.hfstu.framework.model.BaseModel;
import com.hfstu.framework.util.DateUtil;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;

public class UploadFile extends BaseModel {

	private String fileName;
	private String fileUrl;
	private Date uploadDate;
	private String uploadUser;
	private String fileType;
	private Long fileSize;
	private String fileContentType;
	private String isValid;

	public UploadFile() {
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileUrl() {
		return fileUrl;
	}

	public void setFileUrl(String fileUrl) {
		this.fileUrl = fileUrl;
	}

	public Date getUploadDate() {
		return uploadDate;
	}

	public void setUploadDate(Date uploadDate) {
		this.uploadDate = uploadDate;
	}

	public String getUploadUser() {
		return uploadUser;
	}

	public void setUploadUser(String uploadUser) {
		this.uploadUser = uploadUser;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	public Long getFileSize() {
		return fileSize;
	}

	public void setFileSize(Long fileSize) {
		this.fileSize = fileSize;
	}

	public String getFileContentType() {
		return fileContentType;
	}

	public void setFileContentType(String fileContentType) {
		this.fileContentType = fileContentType;
	}

	public String getIsValid() {
		return isValid;
	}

	public void setIsValid(String isValid) {
		this.isValid = isValid;
	}

	public String toJson() {
		StringBuilder json = new StringBuilder();
		json.append("{");
		json.append("'id':'").append(super.getId()).append("',");
		json.append("'fileName':'").append(fileName).append("',");
		json.append("'fileUrl':'").append(fileUrl).append("',");
		try {
			json.append("'uploadDate':'").append(DateUtil.format(uploadDate, "yyyy-MM-dd HH:mm:ss")).append("',");
		} catch (Exception e) {
			e.printStackTrace();
		}
		json.append("'fileType':'").append(fileType).append("',");
		json.append("'uploadUser':'").append(uploadUser).append("',");
		json.append("'fileSize':").append(fileSize).append(",");
		json.append("'fileContentType':'").append(fileContentType).append("'");
		if (json.charAt(json.length() - 1) == ',')
			json.deleteCharAt(json.length() - 1);
		json.append("}");
		return json.toString();
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
